//
//  TgCell.m
//  团购网
//
//  Created by song on 15/1/12.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "TgCell.h"
#import "MyTg.h"
@implementation TgCell

- (void)awakeFromNib {
    // Initialization code
}

+(UITableViewCell *)cellwithTableView:(UITableView *)tableview
{
    static NSString *ID=@"tg";
    TgCell *cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if(cell ==nil)
    {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"tgcellview" owner:nil options:nil] lastObject ];
    }
    return cell;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


-(void)setTg:(MyTg *)tg
{
        self.tgimg.image = [UIImage imageNamed:tg.icon];
        self.titleLable.text = tg.title;
        self.priceLable.text = tg.price;
        self.buyCount.text = tg.buyCount;
}

@end
